#import jsonrpc
#import openssl
#encrypt = openssl.OpenSSL(r'c:\programs\openssl\openssl.exe', r'c:\programs\OpenSSL\keys\timpc.pub', r'c:\programs\OpenSSL\keys\timpc.key', r'c:\programs\OpenSSL\keys')
#s = jsonrpc.ServiceProxy('http://localhost:9213', encrypt=encrypt, keyname='timpc')
#print s.ping()

import jsonrpc
import openssl
#encrypt = openssl.OpenSSL(r'c:\programs\openssl\openssl.exe', r'c:\programs\OpenSSL\keys\timpc.pub', r'c:\programs\OpenSSL\keys\timpc.key', r'c:\programs\OpenSSL\keys')
#s = jsonrpc.ServiceProxy('http://localhost:9213', encrypt=encrypt, keyname='timpc')
#s.exec_command(r'c:\windows\notepad', 10)
#s.exec_shell('dir c:\\', 120)

encrypt = openssl.OpenSSL(r'c:\programs\openssl\openssl.exe', r'c:\programs\OpenSSL\keys\timpc.pub', r'c:\programs\OpenSSL\keys\timpc.key', r'c:\programs\OpenSSL\keys')
s = jsonrpc.ServiceProxy('http://centos.koolin.ru:443', encrypt=encrypt, keyname='centos')
s.shell_exec('ls /', 10)